<?php
namespace addon\cms\validate;
use app\common\validate\ValidateBase;
class MiniChat extends ValidateBase
{
    // 验证规则
    protected $rule = [
        'url'                   => 'require',
        'token'                 => 'require|length:3,32',
        'encodingAESKey'        => 'require'
    ];

    // 验证提示
    protected $message = [
        'url.require'         => '服务器地址必须',
        'token.require'        => '令牌必须',
        'token.length'         =>'令牌长度3-32位',
        'encodingAESKey.require'      => '消息加密密钥必须',
    ];

    // 应用场景
    protected $scene = [
        'add'  =>  ['url','token','encodingAESKey'],
    ];
}